package pobidz;

public class ComplexImage {

	private int sizeX;
	private int sizeY;
	private ComplexPoint[][] pointsR;
	private ComplexPoint[][] pointsG;
	private ComplexPoint[][] pointsB;
	private ComplexPoint punkt;

    public ComplexPoint getPunkt() {
        return punkt;
    }

    public void setPunkt(ComplexPoint punkt) {
        this.punkt = punkt;
    }
	
	public ComplexImage(int sizeX, int sizeY)
	{
		this.sizeX = sizeX;
		this.sizeY = sizeY;
		this.pointsR = new ComplexPoint[sizeX][sizeY];
		this.pointsG = new ComplexPoint[sizeX][sizeY];
		this.pointsB = new ComplexPoint[sizeX][sizeY];
	}

	public ComplexImage(int sizeX, int sizeY, ComplexPoint[][] pointsR, ComplexPoint[][] pointsG, ComplexPoint[][] pointsB)
	{
		this.sizeX = sizeX;
		this.sizeY = sizeY;
		this.pointsR = pointsR;
		this.pointsG = pointsG;
		this.pointsB = pointsB;
		
	}
	

	public int getSizeX() {
		return sizeX;
	}


	public void setSizeX(int sizeX) {
		this.sizeX = sizeX;
	}


	public int getSizeY() {
		return sizeY;
	}


	public void setSizeY(int sizeY) {
		this.sizeY = sizeY;
	}


	public ComplexPoint[][] getPointsR() {
		return pointsR;
	}


	public void setPointsR(ComplexPoint[][] pointsR) {
		this.pointsR = pointsR;
	}
	
	public ComplexPoint[][] getPointsG() {
		return pointsG;
	}


	public void setPointsG(ComplexPoint[][] pointsG) {
		this.pointsG = pointsG;
	}
	public ComplexPoint[][] getPointsB() {
		return pointsB;
	}


	public void setPointsB(ComplexPoint[][] pointsB) {
		this.pointsB = pointsB;
	}
          public static ComplexPoint fromPolar(double r, double theta) {
            ComplexPoint ret = new ComplexPoint(0,0);
            
            ret.setImaginary( (double) (r * Math.sin(theta)));
            ret.setReal((double) (r * Math.cos(theta)))  ;

            
            return ret;
        }
       
	
}
